var bodyParser = require('body-parser'),
  passport = require('passport'),
  express = require('express'),
  session = require('express-session');


module.exports = function (app, config) {
  app.set('view engine', '.html');
  app.use(bodyParser.json());

  app.use(session({secret: 'bigship', resave: true, saveUninitialized: true, cookie: { maxAge: 3600000*48 }}));
  app.use(passport.initialize());
  app.use(passport.session());

  app.use(express.static(config.rootPath + '/public'));
};